﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Destex.Satis
{
    public partial class FiyatKumas : XForm
    {
        public FiyatKumas()
        {
            InitializeComponent();
        }

        private void FiyatKumas_Load(object sender, EventArgs e)
        {
            gridView1.Init("DX_GetFiyatKumas");
            gridView1.FormatAsNumber(2, "MTMAlis", "MTMSatis", "BulkSatis");
            gridView1.MakeReadOnly("CurrencyId", "MTMAlis", "MTMSatis", "BulkSatis");
            gridView1.MakeColumnInvisible("DX_FiyatKumasId");
            gridView1.AddSummary();

            btnKaydet.ItemClick += btnKaydet_ItemClick;
            gridView1.BestFitColumns();
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEditing();
            gridView1.Update("DX_FiyatKumasId,CurrencyId,MTMAlis,MTMSatis,BulkSatis", "DX_FiyatKumas");
            gridView1.BestFitColumns();
        }
    }
}
